home *** CD-ROM | disk | FTP | other *** search
- @ECHO OFF
- :::NOTE: The "#" and "$" symbols may not work with 4DOS or NDOS
- ::: Change these to alphanumeric characters (X, 1, etc) if you wish
- IF "%1"=="" ECHO DO command [arg1 arg2 arg3] FOR filespec1 [filespec2 filespec3...]
- IF "%1"=="" GOTO END
- SET #=$
- SET $=%1
- SHIFT
- :LOOP1 to check format and get args
- IF "%1"=="" DO
- FOR %%A IN (for FOR) DO IF "%1"=="%%A" GOTO LOOP2
- SET #=%#%$
- SET %#%=%1
- SHIFT
- GOTO LOOP1
- :LOOP2 for all filespecs
- IF "%2"=="" GOTO END
- ECHO %$% %2 %$$% %$$$% %$$$$%
- %$% %2 %$$% %$$$% %$$$$%
- SHIFT
- GOTO LOOP2
- :END
- FOR %%X IN (# $ $$ $$$ $$$$) DO SET %%X=
-